-
Notifications
You must be signed in to change notification settings - Fork 541
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Maintain active dataset fields #1878
Conversation
const newDataset = transformDataset(dataset); | ||
|
||
const oldDataset = get(atoms.dataset); | ||
oldDataset && console.log(oldDataset.id, newDataset.id); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Stray console.log?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, thanks
const oldDataset = get(atoms.dataset); | ||
oldDataset && console.log(oldDataset.id, newDataset.id); | ||
if (!oldDataset || oldDataset.id !== newDataset.id) { | ||
reset(_activeFields({ modal: false })); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a reason this isn't in useStateUpdate()
? Looks like there are similar things there.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point, fixed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FIx LGTM. Left a few comments, but shouldn't hold up the fix.
Resolves #1852